﻿@model EasySamba.Models.NewViewModel

<form method="post" asp-action="AddNew">
    <div class="panel panel-default form-group" style="margin-top:20px">
        <div class="panel-heading">
            <strong>新建共享</strong>
        </div>

        <div class="panel-body">
            <div class="input-group">
                <span class="input-group-addon">名称</span>
                <input asp-for="Name" type="text" class="form-control" placeholder="便于被访问者识别的名称" data-val-required="名称不能为空！">
            </div>
            <span asp-validation-for="Name" class="text-danger" data-valmsg-for="Name" data--valmsg-replace="true"></span>
            <br />
            <div class="input-group">
                <span class="input-group-addon">目录</span>
                <input asp-for="Path" type="text" class="form-control" placeholder="要共享的目录" data-val-required="目录不能为空！">
            </div>
            <span asp-validation-for="Path" class="text-danger" data-valmsg-for="Path" data--valmsg-replace="true"></span>
            <br />
            <div class="input-group">
                <span class="input-group-addon">用户</span>
                <input asp-for="User" type="text" class="form-control" placeholder="允许访问的用户（需要密码）">
            </div>
            <br />
            <div class="input-group">
                <span class="input-group-addon">
                    <input asp-for="ReadOnly" type="checkbox" value="true">只读
                </span>
                <input type="text" class="form-control" style="border-left:hidden" readonly="readonly" placeholder="访问者只能读取、不可修改">
            </div>
            <br />
            <div class="input-group">
                <span class="input-group-addon">
                    <input asp-for="EveryOne" type="checkbox">公开
                </span>
                <input type="text" class="form-control" style="border-left:hidden" readonly="readonly" placeholder="任何人都可以访问（无需密码）">
            </div>
        </div>
    </div>

    <a class="btn btn-default" href="/Easy/Index">取消</a>
    <button class="btn btn-primary" type="submit">确定</button>
</form>